<!DOCTYPE html>
<html>
<head>
    <title>修改学生</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <script src="../bootstrap/js/bootstrap.bundle.min.js"></script>
</head>
<body>


<div id="container" style="width:900px">


    <div id="menu" style="background-color:#FFD700;height:200px;width:100px;float:left;">
        <nav class="navbar bg-light">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" href="../Student/list.do">学生</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="../Teacher/list.do">教师</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">课程</a>
                </li>
            </ul>
        </nav></div>


    <div id="content" style="background-color:#EEEEEE;height:200px;width:800px;float:left;">

    <form action="update.do" class="was-validated" method="post">
        <div class="form-group">
            <label for="uname">id:</label>
            <input type="text" class="form-control" id="id" placeholder="Enter username" name="id" th:value="${student.id}" readonly required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入用户名！</div>
        </div>
        <div class="form-group">
            <label for="uname">Username:</label>
            <input type="text" class="form-control" id="uname" placeholder="Enter username" th:value="${student.name}" name="name" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入用户名！</div>
        </div>
        <div class="form-group">
            <label for="pwd">Password:</label>
            <input type="password" class="form-control" id="pwd" placeholder="Enter password" name="password" th:value="${student.password}" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入密码！</div>
        </div>
        <div class="form-group">
            <label for="male">性别:</label>
            <div class="form-check">
                <input class="form-check-input" type="radio" id="male" name="sex"  value="1" th:checked="${student.sex==1}">
                <label class="form-check-label" for="male">男</label>
            </div>
            <div class="form-check">
                <input class="form-check-input" type="radio" id="female" name="sex"  value="0" th:checked="${student.sex==0}">
                <label class="form-check-label" for="female">女</label>
            </div>
        </div>
        <div class="form-group">
            <label for="clazz">班级:</label>
            <input type="text" class="form-control" id="clazz" placeholder="Enter age" name="clazz" th:value="${student.clazz}" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入年龄！</div>
        </div>
        <div class="form-group">
            <label for="birthday">生日:</label>
            <input type="date" class="form-control" id="birthday" placeholder="Enter birthday" name="birthday" th:value="${student.birthday}" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入生日！</div>
        </div>
        <div class="form-group form-check">
            <label class="form-check-label">
                <input class="form-check-input" type="checkbox" name="remember" required> 同意协议
                <div class="valid-feedback">验证成功！</div>
                <div class="invalid-feedback">同意协议才能提交。</div>
            </label>
        </div>
        <button type="submit" class="btn btn-primary">修改学生</button>
    </form>
</div>
</div>
</body>
</html>